 <header class="am-topbar am-topbar-inverse">
    <div class="am-container">
              <h1 class="am-topbar-brand">
                <a href="__ROOT__/"><img src="__PUBLIC__/logo.png"/></a>
              </h1>
              <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
            
              <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
                <ul class="am-nav am-nav-pills am-topbar-nav">
                  <li <if condition="!$type">class="am-active"</if>><a href="__ROOT__/">首页</a></li>
                  <loop table="category">
                        <li <if condition="$type['id']==$v['id']">class="am-active"</if>><a href="{$v.url}">{$v.title}</a></li>
                  </loop>
                  </li>
                </ul>
                
                <if condition="session('muser')">
                    <div class="am-topbar-right">
                      <div class="am-dropdown" data-am-dropdown>
                        <button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-dropdown-toggle" data-am-dropdown-toggle>{:session('muser.username')} <span class="am-icon-caret-down"></span></button>
                        <ul class="am-dropdown-content">
                          <li><a href="{:U('User/index')}">个人空间</a></li>
                          <li><a href="{:U('User/logout')}">退出</a></li>
                        </ul>
                      </div>
                    </div>
                <else/>
                    <div class="am-topbar-right">
                      <a href="{:U('User/register')}" class="am-btn am-btn-primary am-topbar-btn am-btn-sm">注册</a>
                    </div>
                    <div class="am-topbar-right">
                      <a href="{:U('User/login')}" class="am-btn am-btn-primary am-topbar-btn am-btn-sm">登录</a>
                    </div>
                </if>
                </div>
      </div>
 </header>